<?php $this->display('header') ?>
<link href="{$_W['siteroot']}../addons/{MOD_ADD}/static/admin/H/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
    <!--左侧导航开始-->
    <?php $this->display('menu') ?>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <?php $this->display('header_top') ?>
        <div class="row wrapper border-bottom white-bg page-heading">
            <form action="{php echo gWebUrl('log/log_acts')}" method="post" class="form-horizontal" role="form" id="formdata">
                <div class="ibox float-e-margins">
                    <div class="col-xs-2">
                        <div class="input-daterange input-group">
                            <input type="text" class="form-control layer-date" placeholder="请输入操作内容" name="content" value="{$_GPC['content']}">
                        </div>
                    </div>
                    <div class="col-md-4 col-xs-6">
                        <input placeholder="开始日期" class="form-control layer-date"  name="starttime" value="{$_GPC['starttime']}" id="start" autocomplete="off">
                        <input placeholder="结束日期" class="form-control layer-date"  name="endtime" value="{$_GPC['endtime']}" id="end" autocomplete="off">
                    </div>
                    <div class="col-xs-2">
                        <input type="button" class="btn btn-primary" value="搜索" onClick="tpform('{php echo gWebUrl('log/log_acts')}')">
                    </div>
                </div>
            </form>
        </div>
        <div id="table">
            <table class="table table-striped table-bordered table-hover m-t-md">
                <thead>
                <tr>
                    <th class="text-center">编号ID</th>
                    <th class="text-center">操作内容</th>
                    <th class="text-center">用户名</th>
                    <th class="text-center">IP</th>
                    <th class="text-center">时间</th>
                </tr>
                </thead>
                <tbody>
                {loop $aData['data'] $k $v}
                <tr>
                    <td class="text-center">{php echo ((max(1, intval($_GPC['page']))-1)*10)+$k+1}</td>
                    <td class="text-center">{$v['content']}</td>
                    <td class="text-center">{$v['admin_name']}</td>
                    <td class="text-center">{$v['act_ip']}</td>
                    <td class="text-center">{php echo date('Y-m-d H:i',$v['creation_date'])}</td>
                </tr>
                {/loop}
                </tbody>
            </table>
            {$aData['page']}
        </div>
    </div>
    <!--右侧部分结束-->
</div>
<script src="{$_W['siteroot']}../addons/{MOD_ADD}/static/admin/H/js/plugins/jeditable/jquery.jeditable.js"></script>
<!-- layerDate plugin javascript -->
<script src="{$_W['siteroot']}../addons/{MOD_ADD}/static/admin/H/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript">
    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: '1900-01-1', //设定最小日期为当前日期
        max: '2099-06-16', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: '1900-01-1', //设定最小日期为当前日期
        max: '2099-06-16', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
</script>
<?php $this->display('foot') ?>
